#include"process.h"
#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<time.h>
double total = 1024.0;
double range = 1.0;

void DownLoad(){
    double current=0;
    srand(time(NULL));
    while(current<=total){
        FlushProcess(total,current);
        usleep(3000);
        double speed=((double)rand())/RAND_MAX*range;
        current+=speed;
    }
    if(current>total){
        FlushProcess(total,total);
    }

    printf("\n");
}
int main()
{
    DownLoad();
    return 0;
}
